<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>跨域请求</title>
    <script src="javascripts/jquery-1.8.3.min.js"></script>
    <script>
        window.onload = function(){
            $.getJSON('http://localhost:3000/users',function(results){
                console.log(results)
               var strLis = ''
               for(var i = 0 ; i < results.data.length ; i++){
                   strLis += '<li>' + results.data[i].stuName + '</li>'
               }
               $('ul').html(strLis)
            })
        }
    </script>
</head>
<body>
   <ul></ul>
</body>
</html>